<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/8/17
 * Time: 13:40
 */

$times = $_POST['times'];  //投票次数
$url = $_POST['url'];   //投票地址[某个选手下方投票按钮的链接]
while ($times)
{
    $ip1 = 'X-FORWARDED-FOR:'.rand(115,225).'.'.rand(115,225).'.'.rand(115,225).'.'.rand(115,225);
    $ip2 = 'CLIENT-IP:'.rand(115,225).'.'.rand(115,225).'.'.rand(115,225).'.'.rand(115,225);
    $arr = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
    $from = "http://www.".$arr[rand(0,25)].".com/";
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array($ip1, $ip2));
    curl_setopt($ch, CURLOPT_REFERER, $from);
    curl_setopt($ch, CURLOPT_HEADER, 1);
    curl_exec($ch);
    curl_close($ch);
    $times--;
}
return ;